package Database.Recs;

import java.sql.ResultSet;
import java.sql.SQLException;

public class AccountRec {

	Integer id;
	String accountNumber;
	Integer bankNumber;
	String description;
	
	public AccountRec(Integer id, String accountNumber, Integer bankNumber,
			String description) {
		super();
		this.id = id;
		this.accountNumber = accountNumber;
		this.bankNumber = bankNumber;
		this.description = description;
	}
	
	public AccountRec(ResultSet rs)
	{
		try
		{
			id = rs.getInt("ID");
			
			accountNumber = rs.getString("ACCOUNT_NUMBER").trim();
			
			bankNumber = rs.getInt("BANK_NUMBER");
			
			description = rs.getString("DESCRIPTION").trim();
		}
		catch (SQLException e)
		{
			e.printStackTrace();
		}
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getAccountNumber() {
		return accountNumber;
	}

	public void setAccountNumber(String accountNumber) {
		this.accountNumber = accountNumber;
	}

	public Integer getBankNumber() {
		return bankNumber;
	}

	public void setBankNumber(Integer bankNumber) {
		this.bankNumber = bankNumber;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}
	
	
}
